package com.ruoyi.common.service.impl;

import java.util.List;

import com.ruoyi.common.service.IAttachmentsListService;
import com.ruoyi.common.dao.AttachmentsListMapper;
import com.ruoyi.common.entity.AttachmentsList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author dustball
 * @date 2021-04-13
 */
@Service
public class AttachmentsListServiceImpl implements IAttachmentsListService
{
    @Autowired
    private AttachmentsListMapper attachmentsListMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param id 【请填写功能名称】ID
     * @return 【请填写功能名称】
     */
    @Override
    public AttachmentsList selectAttachmentsListById(String id)
    {
        return attachmentsListMapper.selectAttachmentsListById(id);
    }
    /**
     * 查询【根据docunid返回附件列表】
     *
     * @param docUnid 【文档id】DOCUNID
     * @return 【附件信息集合】
     */
    @Override
    public List<AttachmentsList> selectAttachmentsListByDocUnid(String docUnid) {
        return attachmentsListMapper.selectAttachmentsListByDocUind(docUnid);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param attachmentsList 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<AttachmentsList> selectAttachmentsListList(AttachmentsList attachmentsList)
    {
        return attachmentsListMapper.selectAttachmentsListList(attachmentsList);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param attachmentsList 【请填写功能名称】
     * @return 结果
     */
    @Override
    @Transactional
    public int insertAttachmentsList(AttachmentsList attachmentsList)
    {
        return attachmentsListMapper.insertAttachmentsList(attachmentsList);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param attachmentsList 【请填写功能名称】
     * @return 结果
     */
    @Override
    @Transactional
    public int updateAttachmentsList(AttachmentsList attachmentsList)
    {
        return attachmentsListMapper.updateAttachmentsList(attachmentsList);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param ids 需要删除的【请填写功能名称】ID
     * @return 结果
     */
    @Override
    @Transactional
    public int deleteAttachmentsListByIds(String[] ids)
    {
        return attachmentsListMapper.deleteAttachmentsListByIds(ids);
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param id 【请填写功能名称】ID
     * @return 结果
     */
    @Override
    @Transactional
    public int deleteAttachmentsListById(String id)
    {
        return attachmentsListMapper.deleteAttachmentsListById(id);
    }
}
